package com.hsgene.product.domain;

import com.hsgene.common.util.validation.FieldChecker;
import com.hsgene.product.constants.PolicyType;

import java.math.BigDecimal;
import java.util.List;

/**
 * 基因检测套餐产品
 */
public class GeneticTestingProduct {
    /**
     * 产品详情
     */
    List<GeneticTestingProductDetail> testingProductDetailList;

    private String id;

    private String packageName;

    private String packageId;
    /**
     * 药物id
     */
    private String drugId;
    /**
     * 药物名称
     */
    private String drugName;
    /**
     * 靶标（基因）
     */
    private String targets;
    /**
     * 检测内容
     */
    private String detection;
    /**
     * 检测意义
     */
    private String clinical;
    /**
     * 检测价格
     */
    private BigDecimal detectionPrice;
    /**
     * 佣金
     */
    private BigDecimal commission;
    /**
     * 疾病id
     */
    private String cancerId;
    /**
     * 疾病名称
     */
    private String cancerName;
    /**
     * 药物性质（字典）（治疗类型）
     */
    private String nature;
    /**
     * 产品描述(套餐描述)
     */
    private String description;
    /**
     * 政策类型（0政策内，1政策外）
     */
    private Integer policyType;
    /**
     * 政策类型描述
     */
    private  String policyTypeDesc;

    /**
     * 序号
     */
    private Integer serialNumber;
    /**
     * 成本
     */
    private BigDecimal cost;
    /**
     * 0自动排，1人工排序
     */
    private Integer sort;
    private String sortDesc;
    /**
     * 0删除，1未删除
     */
    private Integer deleteFlag;

    private String remarks;

    /**
     *常规案例地服经验值
     */
    private Integer commonGroundVal;
    /**
     * 常规案例医生经验值
     */
    private Integer commonDoctorVal;
    /**
     * 急需案例地服经验值
     */
    private Integer urgentGroundVal;
    /**
     *急需案例医生经验值
     */
    private Integer urgentDoctorVal;
    /**
     * 额外比例
     */
    private BigDecimal extraRatio;

    private Integer sortLevel;


    public String getPolicyTypeDesc() {
        return policyTypeDesc;
    }

    public String getSortDesc() {
        return sortDesc;
    }

    public void setSortDesc(String sortDesc) {
        this.sortDesc = sortDesc;
    }

    public void setPolicyTypeDesc(String policyTypeDesc) {
        this.policyTypeDesc = policyTypeDesc;
    }



    public List<GeneticTestingProductDetail> getTestingProductDetailList() {
        return testingProductDetailList;
    }

    public void setTestingProductDetailList(List<GeneticTestingProductDetail> testingProductDetailList) {
        this.testingProductDetailList = testingProductDetailList;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getPackageName() {
        return packageName;
    }

    public void setPackageName(String packageName) {
        this.packageName = packageName == null ? null : packageName.trim();
    }

    public String getPackageId() {
        return packageId;
    }

    public void setPackageId(String packageId) {
        this.packageId = packageId == null ? null : packageId.trim();
    }

    public String getDrugId() {
        return drugId;
    }

    public void setDrugId(String drugId) {
        this.drugId = drugId == null ? null : drugId.trim();
    }

    public String getDrugName() {
        return drugName;
    }

    public void setDrugName(String drugName) {
        this.drugName = drugName == null ? null : drugName.trim();
    }

    public String getTargets() {
        return targets;
    }

    public void setTargets(String targets) {
        this.targets = targets == null ? null : targets.trim();
    }

    public String getDetection() {
        return detection;
    }

    public void setDetection(String detection) {
        this.detection = detection == null ? null : detection.trim();
    }

    public String getClinical() {
        return clinical;
    }

    public void setClinical(String clinical) {
        this.clinical = clinical == null ? null : clinical.trim();
    }

    public BigDecimal getDetectionPrice() {
        return detectionPrice;
    }

    public void setDetectionPrice(BigDecimal detectionPrice) {
        this.detectionPrice = detectionPrice;
    }

    public BigDecimal getCommission() {
        return commission;
    }

    public void setCommission(BigDecimal commission) {
        this.commission = commission;
    }

    public String getCancerId() {
        return cancerId;
    }

    public void setCancerId(String cancerId) {
        this.cancerId = cancerId == null ? null : cancerId.trim();
    }

    public String getCancerName() {
        return cancerName;
    }

    public void setCancerName(String cancerName) {
        this.cancerName = cancerName == null ? null : cancerName.trim();
    }

    public String getNature() {
        return nature;
    }

    public void setNature(String nature) {
        this.nature = nature == null ? null : nature.trim();
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description == null ? null : description.trim();
    }

    public Integer getPolicyType() {
        return policyType;
    }

    public void setPolicyType(Integer policyType) {
        this.policyType = policyType;
    }

    public Integer getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(Integer serialNumber) {
        this.serialNumber = serialNumber;
    }

    public BigDecimal getCost() {
        return cost;
    }

    public void setCost(BigDecimal cost) {
        this.cost = cost;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks == null ? null : remarks.trim();
    }

    /**
     * 字段校验
     */
    public void check(){
        FieldChecker.checkEmpty(this.detectionPrice, "套餐价格不能为空");

        FieldChecker.checkEmpty(this.drugId, "药物不能为空");
        FieldChecker.checkEmpty(this.drugName, "药物不能为空");
        FieldChecker.checkEmpty(this.cancerId, "疾病不能为空");
        FieldChecker.checkEmpty(this.cancerName, "疾病不能为空");
        FieldChecker.checkEmpty(this.targets, "基因不能为空");
        FieldChecker.checkEmpty(this.detection, "检测内容不能为空");
        FieldChecker.checkEmpty(this.clinical, "检测意义不能为空");
       /* FieldChecker.checkEmpty(this.sort, "是否人工排序不能为空");
        FieldChecker.checkEmpty(this.serialNumber, "序号不能为空");*/
    }

    public Integer getCommonGroundVal() {
        return commonGroundVal;
    }

    public void setCommonGroundVal(Integer commonGroundVal) {
        this.commonGroundVal = commonGroundVal;
    }

    public Integer getCommonDoctorVal() {
        return commonDoctorVal;
    }

    public void setCommonDoctorVal(Integer commonDoctorVal) {
        this.commonDoctorVal = commonDoctorVal;
    }

    public Integer getUrgentGroundVal() {
        return urgentGroundVal;
    }

    public void setUrgentGroundVal(Integer urgentGroundVal) {
        this.urgentGroundVal = urgentGroundVal;
    }

    public Integer getUrgentDoctorVal() {
        return urgentDoctorVal;
    }

    public void setUrgentDoctorVal(Integer urgentDoctorVal) {
        this.urgentDoctorVal = urgentDoctorVal;
    }

    public BigDecimal getExtraRatio() {
        return extraRatio;
    }

    public void setExtraRatio(BigDecimal extraRatio) {
        this.extraRatio = extraRatio;
    }

    public Integer getSortLevel() {
        return sortLevel;
    }

    public void setSortLevel(Integer sortLevel) {
        this.sortLevel = sortLevel;
    }
}